<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>盛世机电</title>
    <link href="/common/css/common-ui.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="/css/backstageManage/projectInfo.css" />
    <script>
        if(localStorage.getItem("token")==null){
            window.history.replaceState(null, "", '/login.html');
            location.reload()
        }
    </script>
</head>

<body>
    <div class="page-container">
        <div class="side-menu"></div>
        <div class="main-container">
            <div class="header-content">
                <i class="aidicon aidicon-backburger"></i>
                <span class="title-text"></span>
                <div class="user-info pull-right">
                    <img src="/images/backstageManage/img_01.png">
                    <span class="username"></span>
                </div>
            </div>
            <div class="main-content">
                <div class="main-wrapper">
                    <div class="standard-table-btn-con">
                        <button type="button" class="btn btn-primary m-right" id="add">新增</button>
                        <button type="button" class="btn btn-default m-right" id="delete_all"
                            disabled="disabled">批量删除</button>

                        <div class="right-operate-con">
                            <div class="searchbox m-right">
                                <span class="aidicon aidicon-magnify" id="search-icon"></span>
                                <input id="search_val" placeholder="请输入搜索内容" />
                                <span class="aidicon aidicon-close"></span>
                            </div>
                        </div>
                    </div>
                    <div class="standard-table-body-con">
                        <table id="standard_table" class="display" cellspacing="0" width="100%"
                            style="table-layout: fixed;"></table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div id="editModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="editModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">新增或者修改系统分类名称</h4>
                </div>
                <div class="modal-body">
                    <div class="form-default">
                        <form class="form-validate-dom">
                            <label for="className"><i>*</i>系统分类名称</label>
                            <input id="sysClassId" type="hidden" value=""/>
                            <div class="form-group">
                                <input type="text" class="form-control" id="sysClassName" name="sysClassName" required
                                    placeholder="请输入" autocomplete="off" value="">
                            </div>
                        </form>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary saveOrUpdateClassName">保存</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>

    <script id="addFormTpl" type="text/html">
        {{if data.id}}
            <input type="hidden" id="id" value="{{data.id}}"/>
        {{/if}}
        <div class="form-default">
            <form class="form-validate-dom addForm">
                <label for="identification"><i>*</i>项目ID</label>
                <div class="form-group">
                    <input type="text" class="form-control" id="identification" name="identification" placeholder="请输入" required autocomplete="off" value="{{data.identification}}">
                </div>
                <label for="name"><i>*</i>项目名称</label>
                <div class="form-group">
                    <input type="text" class="form-control" id="name" name="name" placeholder="请输入(建议不超过18个字，否则影响前台展示)" required autocomplete="off" value="{{data.name}}">
                </div>  
                <label for="city"><i>*</i>所在地区</label>
                <div class="form-group">
                    <input type="text" class="form-control" id="city" name="city" placeholder="请输入" required autocomplete="off" value="{{data.city}}">
                </div>  
                <label for="createTime"><i>*</i>起始时间</label>
                <div class="form-group">
                    <input type="text" class="form-control from-date" id="createTime" name="createTime" placeholder="请选择时间" required autocomplete="off" value="{{data.createTime}}">
                    <span class="aidicon aidicon-calendar dateicon icon1"></span>
                </div>  
                <label for="area"><i>*</i>建筑面积（万平方米）</label>
                <div class="form-group">
                    <input type="text" class="form-control" id="area" name="area" placeholder="请输入" required autocomplete="off" value="{{data.area}}">
                </div>  
                <label for="panelX"><i>*</i>项目地址经度</label>
                <div class="form-group">
                    <input type="text" class="form-control" id="panelX" name="panelX" placeholder="请输入" autocomplete="off" value="{{data.panelX}}">
                </div>  
                <label for="panelY"><i>*</i>项目地址纬度</label>
                <div class="form-group">
                    <input type="text" class="form-control" id="panelY" name="panelY" placeholder="请输入" autocomplete="off" value="{{data.panelY}}">
                </div>  
                <label for="maxColdLoad">项目最大冷负荷</label>
                <div class="form-group">
                    <input type="text" class="form-control" id="maxColdLoad" name="maxColdLoad" placeholder="请输入" autocomplete="off" value="{{data.maxColdLoad}}">
                </div>  
                <label for="maxHotLoad">项目最大热负荷</label>
                <div class="form-group">
                    <input type="text" class="form-control" id="maxHotLoad" name="maxHotLoad" placeholder="请输入" autocomplete="off" value="{{data.maxHotLoad}}">
                </div>  
                <label for="heatPumpCapacity">地源热泵装机容量(千瓦)</label>
                <div class="form-group">
                    <input type="text" class="form-control" id="heatPumpCapacity" name="heatPumpCapacity" placeholder="请输入" autocomplete="off" value="{{data.heatPumpCapacity}}">
                </div>  
                
                <div class="form-group">
                    <label>项目模式</label><br>
                    <label class="radio-inline radio-card">
                        <input type="radio" value="0" name="mode" value="供冷" {{if data.mode=="0"}}checked{{/if}}>
                        <span class="text-label">供冷</span>
                    </label>
                    <label class="radio-inline radio-card">
                        <input value="1" type="radio" name="mode" {{if data.mode=="1"}}checked{{/if}}>
                        <span class="text-label">供暖</span>
                     </label>
                </div>
                <label for="description"><i>*</i>项目介绍</label>
                <div class="form-group">
                    <textarea class="form-control" rows="3" id="description" name="description" placeholder="请输入至少5个字符" required minlength="5">{{data.description}}</textarea>  
                </div>
                <label for="status"><i>*</i>远程控制</i></i></label>
                <span class="btn-switch" id="control-btn">
                    <label>
                        <input id="isRemoted" name="isRemoted" type="checkbox" aria-describedby="toggle" value="{{if data.isRemoted==true}}1{{else}}0{{/if}}" required>
                        <span class="btn-switch-inner">
                            <span class="btn-switch-close" style="position: relative;top: 4px;">开启</span>
                            <span class="btn-switch-open" style="position: relative;top: 4px;">关闭</span>
                        </span>
                    </label>
                </span>
                <div class="control-content" style="display: none;">
                    <label for="panelY"><i>*</i>Mqtt Topic</label>
                    <div class="form-group">
                        <input type="text" class="form-control" id="topic" name="topic" placeholder="请输入" autocomplete="off" value="{{data.topic}}" required>
                    </div> 
                    <label for="panelY"><i>*</i>出水温度设定标识符</label>
                    <div class="form-group">
                        <input type="text" class="form-control" id="temperatureSettingTag" name="temperatureSettingTag" placeholder="请输入" autocomplete="off" value="{{data.temperatureSettingTag}}">
                    </div> 
                    <label for="panelY"><i>*</i>一键启停标识符</label>
                    <div class="form-group">
                        <input type="text" class="form-control" id="startStopTag" name="startStopTag" placeholder="请输入" autocomplete="off" value="{{data.startStopTag}}">
                    </div> 
                    <label for="panelY"><i>*</i>冬夏切换标识符</label>
                    <div class="form-group">
                        <input type="text" class="form-control" id="summerWinnerTag" name="summerWinnerTag" placeholder="请输入" autocomplete="off" value="{{data.summerWinnerTag}}">
                    </div> 
                </div>
            </form> 
        </div>
    </script>
    <script id="classifyTpl" type="text/html">
        <div class="search-wrap">
            <button type="button" class="btn btn-primary" id="addClassify" data-toggle="modal" data-target="#editModal">新增</button>
        </div>
        <table id="grid-demo-1" class="display" cellspacing="0" width="100%" style="table-layout: fixed;"></table>
    </script>
    <script id="imgTpl" type="text/html">
        <div class="clearfix">
            <div class="img-header"><i class="aidicon aidicon-file-document"></i>设备监测底图</div>
            <!-- <p>上传图片</p>
            <div id="progressDemo1">
                <ul class="photoUpload-ul">
                    <li id="photoUploadMulti1" class="photoUpload">
                        <i id="chose_file1" class="aidicon aidicon-plus"></i>
                        <div class="photoUpload-info">上传</div>
                    </li>
                </ul>
            </div> -->
            <div id="progressDemo1">
                <button id="chose_file3" type="button" class="btn btn-primary"><span class="aidicon aidicon-upload margin-right-small-3"></span>文件上传</button>
                <div style="font-size:12px;color:#A2AABB;padding-top:4px;">支持扩展名: .jpg .png .gif .jpeg... </div>
            </div>
        </div>
        <div class="clearfix">
            <div class="img-header"><i class="aidicon aidicon-file-document"></i>主页项目略图</div>
            <p>上传图片</p>
            <div id="progressDemo2">
                <ul class="photoUpload-ul">
                    <li id="photoUploadMulti2" class="photoUpload">
                        <i id="chose_file2" class="aidicon aidicon-plus"></i>
                        <div class="photoUpload-info">上传</div>
                    </li>
                </ul>
            </div>
        </div>
    </script>
    <script src="/common/js/lib/require/require.min.js"></script>
    <script>
        require(["/js/require.config.js"], function () {
            require(["/js/backstageManage/menu.js"], function () {
                require(["/js/backstageManage/projectInfo.js"], function (app) {
                    app.init();
                });
            });
        });
    </script>
</body>

</html>